home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 32 / 032.d81 / watch your langu (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  9KB  |  262 lines

  1. 2 sw=5:bk$="[164]"
  2. 3 poke53280,.:poke53281,.:print"[147]":poke650,128
  3. 4 es$="                                       "
  4. 5 dimvt$(24),ht$(40),g$(30)
  5. 6 vt$(1)=chr$(19):fori=2to24:vt$(i)=vt$(i-1)+chr$(17):next
  6. 7 ht$(1)=chr$(145)+chr$(13):fori=2to40:ht$(i)=ht$(i-1)+chr$(29):next
  7. 10 rem==================
  8. 11 rem= jeff truelsen
  9. 20 rem= 700 warren road
  10. 30 rem= apartment 20-2e
  11. 40 rem= ithaca, ny 14850
  12. 45 rem==================
  13. 50 gosub10000: rem  init
  14. 1000 remmain menu
  15. 1010 print"[147]"vt$(3)ht$(12);
  16. 1015 print"[204]oadstar [208]resents":printvt$(6);:gosub12500
  17. 1020 printvt$(12)ht$(19)"[158]by"vt$(14)ht$(12);
  18. 1025 print"[129][202]eff [211]. [212]ruelsen"vt$(16)ht$(7);
  19. 1027 print "([153][195]) 1986 [199]uanozap [211]oftware"vt$(18)ht$(8);
  20. 1028 print"[206]ot in the [208]ublic [196]omain"
  21. 1030 rem window
  22. 1040 printvt$(21)"[154]>-->-->[159][208]ress any key to [195]ontinue[154]<--<--<"
  23. 1042 forpa=1to70:nextpa:getkb$:ifkb$=""thenr=rnd(1)
  24. 1045 r=rnd(1):printvt$(21);:print"->-->--";
  25. 1047 printht$(33);:print"--<--<-":forpa=1to70: nextpa
  26. 1050 r=rnd(1):printvt$(21);:print"-->-->-";
  27. 1053 printht$(33);:print"-<--<--":forpa=1to70: nextpa:ifkb$=""thengoto1040
  28. 1060 fori=1to7:print:forpa=1to60:nextpa: nexti:fori=5to20:printvt$(i)es$:next
  29. 1064 printvt$(7);:printht$(1);
  30. 1070 print"[196]o you need instructions ([159][217][154]/[159][206][154])? ";
  31. 1075 poke198,0:wait198,1:getyn$:ifyn$="y"thengosub12000:goto1090
  32. 1080 ifyn$<>"n"thenprintht$(1);:goto1070
  33. 1085 printht$(1)"                                "
  34. 1090 printvt$(7);:printht$(1);
  35. 1100 printvt$(9);:printht$(4);:print"[195]hoose a number between [153]1 and [153]5."
  36. 1105 print:print"[154][212]he numbers in parentheses have already": print
  37. 1107 printht$(7);:print"been used in this session."
  38. 1110 printvt$(16);:fori=1to5:printht$(6*i)i;
  39. 1113 i$=right$(str$(i),1)
  40. 1115 ifu(i)thenprintht$(6*i);:print"[154]([159]"i$"[154])";
  41. 1120 next
  42. 1130 printvt$(20)ht$(1)"[154]or press";
  43. 1132 printht$(18)"[176][192][174]":print" [154][[158][209][154]] to";
  44. 1134 printht$(18)"[221][158] [146][221]":print"  [154][209]uit";
  45. 1136 printht$(18)"[173][192][189]":printvt$(21)ht$(19);
  46. 1138 poke198,0:wait198,1:getyn$
  47. 1139 ifyn$>" "andyn$<chr$(122)thenprint"[158]"yn$
  48. 1140 ifyn$="q"then15000
  49. 1150 ifyn$<"1"oryn$>"5"then1130
  50. 1160 nm$="story"+yn$:u(val(yn$))=1
  51. 2000 remget story
  52. 2005 forpa=1to200:nextpa:printvt$(20);: printht$(1);
  53. 2010 printvt$(23)ht$(6)"[129][204]oading story ([158]20 seconds[129]) "
  54. 2015 ti$="000000"
  55. 2020 open8,8,8,nm$+".text"
  56. 2030 rem
  57. 2040 input#8,tt$
  58. 2050 input#8,bl
  59. 2060 for i = 1 to bl
  60. 2070 input#8,c$(i): next 
  61. 2080 input#8,ma
  62. 2090 fori=1toma:a$(i)=""
  63. 2100 get#8,x$
  64. 2104 ifx$<>chr$(13)thena$(i)=a$(i)+x$:goto2100
  65. 2105 next
  66. 2110 close8
  67. 2115 printvt$(23);:printht$(6);:print "        [158][211]tory loaded        "
  68. 2120 printvt$(24);:printht$(3);
  69. 2123 print" [205]essing with details (15 seconds) "
  70. 2124 ti$="000000"
  71. 2125 fori=1toma:t$="":forj=1tolen(a$(i)):m$=mid$(a$(i),j,1):ifm$="["thenm$=","
  72. 2130 t$=t$+m$:next:a$(i)=t$:next:fori=1toma
  73. 2135 ifright$(a$(i),1)="="thena$(i)=left$(a$(i),len(a$(i))-1)+" "
  74. 2140 next 
  75. 2150 fh=bl:fl=1:fori=1tobl:ifval(c$(i))>100thenf(fh)=i:fh=fh-1:goto2170
  76. 2160 f(fl) = i:fl = fl + 1
  77. 2170 next:deffnr(x)=int(rnd(1)*fh)+1:fori=1tobl:f1=fnr(i):f2=fnr(i)
  78. 2175 t=f(f1):f(f1) = f(f2):f(f2) = t: next 
  79. 2180 rem fill the blanks
  80. 2185 print"[147]"
  81. 2190 printht$(9)"[158] [198]illing in the blanks "
  82. 2200 fori=1tobl:c=val(c$(f(i))):ifc>100thenc$(f(i))=c$(c-100):goto2240
  83. 2210 printvt$(5)ht$(12)"[154][194]lank #[159]"i" [154]of [159]"fh"   "
  84. 2215 ll=len(w$(c)):printvt$(7);:printht$(19-(ll /2));:forj=1toll+2
  85. 2216 print"[155]*";:next:printvt$(8);:printht$(19-(ll/2));:print"[155]*"w$(c)"[155]*"
  86. 2217 printvt$(9);:printht$(19-(ll/2));:forj=1toll+2:print"[155]*";:next
  87. 2218 printvt$(15)ht$(1)"[129][196]efinition:[158]":printd$(c)
  88. 2219 printvt$(20)"[129][197]xamples:[158]":printe$(c):printvt$(11)"--> [155]"bk$;
  89. 2220 mo=158:nc=30:gosub60500:c$(f(i))=a$
  90. 2225 forxx=5to23:printvt$(xx)es$:next:goto2240
  91. 2230 c$(f(i))=c$(f(i))+chr$(peek(j)-128):next
  92. 2240 next
  93. 3000 rem display
  94. 3001 sw=4
  95. 3002 poke198,0
  96. 3005 print"[147]"
  97. 3010 printvt$(2)ht$(19-(len(tt$)/2));:print" "tt$" [150]"
  98. 3020 printvt$(4);:printht$(1);:nl=0:r$="":s$="":t$="":b=1:h=1:a=0
  99. 3030 a=a+1:ifa>(ma)then3100
  100. 3040 r$=r$+a$(a)
  101. 3050 l=len(r$)
  102. 3060 ifleft$(r$,1)="]"thenr$=" "+ right$(r$,l-1):rt=1
  103. 3065 getx$:ifx$<>""thengoto3160
  104. 3070 if  left$ (r$,1) = "*" then t$ = t$ + c$(b):b = b + 1: goto 3120
  105. 3080 ifleft$(r$,1)<>" "thenws=abs(len(t$)> 0):s$(ws)=s$(ws)+left$(r$,1):goto3120
  106. 3090 s=len(s$(0))+len(s$(1))+len(t$):ifs+h>39thenprint:h=1:nl=nl+1
  107. 3095 ifs+h>39thenifnl>10thengosub4000:nl=0:printvt$(4);
  108. 3100 prints$(0);:print""t$"[146]";:prints$(1)" ";
  109. 3105 h=h+s+1:s$(0)="":s$(1)="":t$="":ifa>(ma)then3160
  110. 3110 ifrt<>0thenrt=0:print"":h=1:nl=nl+1:ifnl>10thengosub4000:nl=1:printvt$(4);
  111. 3120 l=l-1
  112. 3130 ifl=0thenr$="":goto 3030
  113. 3140 r$ =  right$ (r$,l)
  114. 3150 goto 3060
  115. 3160 forpa=1to200:nextpa:print:forpa=1to200:nextpa:print
  116. 3165 printvt$(23);:printht$(13);:print"-- [212]he [197]nd --"
  117. 3167 gosub 4000:printchr$(147);
  118. 3170 printchr$(147);:printvt$(11);:print"[154][215]ant to re-read your story? ([217]/[206]) ";
  119. 3175 poke198,0:wait198,1:getyn$:ifyn$="y"then3000
  120. 3180 ifyn$<>"n"then3170
  121. 3190 printchr$(147);:printvt$(11);:print"[215]ant to fill in another story? ([217]/[206]) ";
  122. 3195 poke198,0:wait198,1:getyn$:ifyn$="y"thenprintchr$(147);:gosub12500
  123. 3198 ifyn$="y"thenprintvt$(7);:printht$(1);:goto1070
  124. 3200 if yn$ <>"n"then 3190
  125. 3210 goto 15000
  126. 4000 rem bottom of screen
  127. 4010 rem
  128. 4020 rem
  129. 4030 printvt$(24)"      [[208]ress any key to continue][150]"
  130. 4035 poke198,0:wait198,1:getyn$:fori=24toswstep-1:printvt$(i)es$:next
  131. 4040 return 
  132. 5000 r$="":s$="":t$="":s=1
  133. 5010 fori=1toma
  134. 5015 r$=r$+a$(i)
  135. 5020 forx=1tolen(r$)
  136. 5030 if mid$(r$,x,1)="*"thens$=left$(r$,x-1):t$=c$(s):r$=right$(r$,len(r$)-x-1)
  137. 5040 if mid$(r$,x,1)="["thenr$=left$(r$,x-1)+","+right$(r$,len(r$)-x-1)
  138. 5045 if mid$(r$,x,1)="]"thenprintleft$(r$,x-1)
  139. 5050 if t$<>""thenprints$""t$"[146]";:t$="":s=s+1:goto5020
  140. 5060 next x
  141. 5070 next i
  142. 5080 return
  143. 10000 rem init
  144. 10010 dimw$(30),c$(100),a$(100),f(100)
  145. 10020 dim d$(30),e$(30): rem  defs & examples
  146. 10025 z=0:remkb=49152:cl=49168:zb=-16336
  147. 10030 for i = 1 to 22
  148. 10040 read w$(i),d$(i),e$(i):next
  149. 10050 return 
  150. 11000 rem word types & defs
  151. 11010 data"[206]oun","a person, place or thing","[205]ailman / [200]eaven / [211]chool [194]us"
  152. 11020 data"[195]oncrete [206]oun",a noun with physical existence
  153. 11025 data"[195]atalog / [204]amb / [197]levator"
  154. 11030 data"[193]bstract [206]oun",a concept or state of mind,"[210]eality / [208]eace / [207]pinion"
  155. 11040 data"[208]lural [206]oun","a group of persons, places or things"
  156. 11045 data"[205]ice / [196]oors / [208]izzas"
  157. 11050 data"[205]aterial/[211]ubstance",a quantity of something
  158. 11055 data"[211]ulphuric [193]cid / [212]ar / [205]olasses"
  159. 11060 data"[193]djective",describes a person or a thing,"[195]lever / [199]reen / [213]gly"
  160. 11070 data"[193]dverb",describes how something is done.        usually ends in -ly
  161. 11075 data"[209]uickly / [211]loppily / [200]appily"
  162. 11080 data"[208]resent [212]ense [214]erb ([201]...)",an action word,"[197]at / [213]nwrap / [212]hink"
  163. 11090 data"[208]resent [212]ense [214]erb ([200]e/[211]he/[201]t...)",an action word
  164. 11095 data"[197]ats / [213]nwraps / [212]hinks"
  165. 11100 data"[208]ast [212]ense [214]erb"
  166. 11105 dataan action that already happened.        often ends in -ed
  167. 11107 data"[193]te / [213]nwrapped / [212]hought"
  168. 11110 data"-ing [214]erb",an action word in -ing form
  169. 11115 data"[212]hinking / [197]ating / [213]nwrapping"
  170. 11120 data"[204]ocation",any place name,"[194]oston / [202]upiter / [212]he [194]asement"
  171. 11130 data"[206]umber",a # either spelled out or in numerals
  172. 11135 data"147 / [198]our [205]illion / [211]ix and a [200]alf"
  173. 11140 data"[195]olor",the name of any color or hue,"[194]lue / [196]ull [199]ray / [207]ff-[215]hite"
  174. 11150 data"[193]nimal",the name of any living thing,"[200]orse / [212]ermite / [194]ald [197]agle"
  175. 11160 data"[197]xclamation"
  176. 11165 data"[211]omething you might say when            surprised or excited"
  177. 11168 data"[215]ow / [207]ops / [200]ow [193]bout [212]hat"
  178. 11170 data"[211]illy [